package framework.impl;

import framework.api.InternalKieModule;
import framework.api.KieRepository;
import framework.api.ReleaseId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class KieRepositoryImpl implements KieRepository {

    private static final Logger log = LoggerFactory.getLogger(KieRepositoryImpl.class);
    private final KieModuleRepo kieModuleRepo;
    public static final KieRepository INSTANCE = new KieRepositoryImpl();

    public KieRepositoryImpl() {
        kieModuleRepo = new KieModuleRepo();
    }

    @Override
    public void addKieModule(InternalKieModule kieModule) {
        kieModuleRepo.store(kieModule);
        log.info("KieModule was added: " + kieModule);
    }

    @Override
    public ReleaseId getDefaultReleaseId() {
        return null;
    }

    static class KieModuleRepo {

        synchronized void store(InternalKieModule kieModule) {

        }

    }
}
